<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@ taglib uri="/WEB-INF/tags/CommonFunction.tld" prefix="cfn" %>  
<%@include file="/commons/include/html_doctype.html" %>
<html>
<head>
<title>销售报表</title>
<%@include file="/commons/include/get.jsp" %>
<script type="text/javascript" src="${ctx}/js/calendar/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx}/js/calendar/date.js"></script>
<script type="text/javascript">
$(function(){
	selectDateMonth($("#accPeriodStart_panel"), $("#accPeriodStart"));
	selectDateMonth($("#accPeriodEnd_panel"), $("#accPeriodEnd"));
});
</script>
</head> 
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">销售报表</td>
		<td>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="queryForm" method="post" action="queryReports.htm">
<table border="0" cellspacing="0" cellpadding="0" class="queryTable">
	<tr>
		<td class="title">数据源：</td>
		<td class="input"><select name="sourceType" id="sourceType">
		  <option value="1"<c:if test="${param.sourceType == 1}"> selected</c:if>>送货单</option>
          <option value="2"<c:if test="${param.sourceType == 2}"> selected</c:if>>发票附件</option>
    </select></td>
		<td class="input"><span class="title">统计时间方式：</span></td>
	  <td class="input"><select name="statTimeType" id="statTimeType">
	    <option value="1"<c:if test="${param.statTimeType == 1}"> selected</c:if>>日</option>
        <option value="2"<c:if test="${param.statTimeType == 2}"> selected</c:if>>月</option>
        <option value="3"<c:if test="${param.statTimeType == 3}"> selected</c:if>>年</option>
      </select></td>
	  <td class="input"><span class="title">统计表达方式：</span></td>
	  <td class="input"><select name="statUserType" id="statUserType">
	    <option value="1"<c:if test="${param.statUserType == 1}"> selected</c:if>>客户</option>
        <option value="2"<c:if test="${param.statUserType == 2}"> selected</c:if>>业务员</option>
      </select></td>
	  <td class="input"><span class="title">核算期：</span></td>
	  <td class="input"><input type="hidden" id="accPeriodStart" name="accPeriodStart" value="${param.accPeriodStart}" /><input type="hidden" id="accPeriodEnd" name="accPeriodEnd" value="${param.accPeriodEnd}" /><div id="accPeriodStart_panel" style="width:120px; float:left;"></div><div style="float:left; width:20px;">~</div><div id="accPeriodEnd_panel" style="width:120px; float:left;"></div></td>
	  <td class="input">日期：</td>
	  <td class="input"><input name="startDate" type="text" id="startDate" size="10" readonly="readonly" value="${param.startDate}" class="Wdate" onFocus="WdatePicker({isShowWeek:true})">
	    -
      <input name="endDate" type="text" id="endDate" size="10" readonly="readonly" value="${param.endDate}" class="Wdate" onFocus="WdatePicker({isShowWeek:true})"></td>
	</tr>
	<tr>
		<td class="query" colspan="10"><input id="_querySubmit_" type="submit" class="button" value="查询" /></td>
	</tr>
</table>
</form>
<div class="line"></div>
<form id="listForm" method="post" action="delOrder.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr class="list_title">
		<td>数据源</td>
		<td>统计时间方式</td>
		<td>统计表达方式</td>
		<td>客户代码</td>
		<td>业务员代码</td>
		<td>开始统计核算期</td>
		<td>终止统计核算期</td>
		<td>开始统计日期</td>
		<td>终止统计日期</td>
		<td>统计汇总金额</td>
	</tr>
<c:forEach items="${pageModel.result}" var="d" varStatus="status">
	<tr class="${status.index%2==0?'list_even':'list_odd'}">
		<td>
        <c:choose>            
		<c:when test="${param.sourceType == 1}">
            送货单
            </c:when>
            <c:when test="${param.sourceType == 2}">
            发票附件
            </c:when>
        </c:choose>	
        </td>
		<td><c:choose>            
		<c:when test="${param.statTimeType == 1}">
            日
            </c:when>
            <c:when test="${param.statTimeType == 2}">
            月
            </c:when>
            <c:when test="${param.statTimeType == 3}">
            年
            </c:when>
        </c:choose></td>
		<td><c:choose>            
		<c:when test="${param.statUserType == 1}">
            客户
            </c:when>
            <c:when test="${param.statUserType == 2}">
            业务员
            </c:when>
        </c:choose></td>
		<td>
		<c:if test="${param.statUserType == 1}">${d.customCode}</c:if></td>
		<td><c:if test="${param.statUserType == 2}">${d.customCode}</c:if></td>
		<td>${param.accPeriodStart}</td>
		<td>${param.accPeriodEnd}</td>
		<td>${param.startDate}</td>
		<td>${param.endDate}</td>
		<td>${d.statAmount}</td>
	  </tr>
</c:forEach>
</table>
<input id="_submit_" type="submit" style="display:none;" />
</form>
<table border="0" cellspacing="0" cellpadding="0" class="bottomTable">
	<tr><td>${pageNav.page}</td></tr>
</table>
</body>
</html>
